package com.kymatrix.mpo.plus.bpm.server.model.entity.definition;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.kymatrix.mpo.plus.common.business.common.BaseTenantEntity;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

/**
 * BPM 工作流的表单定义
 * 用于工作流的申请表单，需要动态配置的场景
 */
@TableName(value = "t_bpm_form", autoResultMap = true)
@Data
@Accessors(chain=true)
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class BpmFormEntity extends BaseTenantEntity {

    /**
     * 表单名
     */
    @TableField("name")
    private String name;
    
    /**
     * 状态 
     * 枚举 {@link com.kymatrix.mpo.plus.common.enums.EnableTypeEnum}
     */
    @TableField("status")
    private String status;
    
    /**
     * 表单的配置
     */
    @TableField("conf")
    private String conf;
    
    /**
     * 表单项的数组
     */
    @TableField(value = "fields", typeHandler = JacksonTypeHandler.class)
    private List<String> fields;
    
    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

}
